<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="crm.util.ParamUtil" %>
<%@ page import="crm.model.Product_model"%>
<%@ page import="crm.model.Product_system"%>
<%@ page import="crm.model.Product_service"%>
<%@ page import="crm.util.Pagination"%>
<%@ page import="crm.control.ProductControl"%>
<%@ page import="crm.model.Product_system_stage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>product_service</title>
</head>
<body>
  <form>
  </form>
  <form>
  <table>
  <thead>
  <tr>
  <th>服务编号</th>
  <th>服务名称</th>
  <th>价格</th>
  <th>创建时间</th>
  <th>描述</th>
  <th>操作</th>
  <th>操作</th>
  </tr>
  </thead>
  <tbody>
   <%

      int servicePages=ParamUtil.getInt(request,"pages",0);
      int serviceRowsPerpage=ParamUtil.getInt(request,"pageSize",10);
      Product_service productService=new Product_service();
      ProductControl pcService=new ProductControl();
      List<Product_service> listServices=new ArrayList<Product_service>();

      listServices=(List)pcService.getService(servicePages,serviceRowsPerpage,"create_time");
      for(int i=0;i<listServices.size();i++){
      productService=(Product_service)listServices.get(i);

    %>
  <tr>
  <td><%=productService.getService_number() %></td>
  <td><%=productService.getService_name() %></td>
  <td><%=productService.getPrice() %></td>
  <td><%=productService.getCreate_time() %></td>
  <td><%=productService.getDescription() %></td>
  <td><a href="product_service_update.jsp?id=<%=productService.getId() %>">修改</a></td>
  <td><a href="product_service_delete.jsp?id=<%=productService.getId()%>" onclick='return confirm("确定要删除吗?")'>删除</a></td>
  </tr>
  <%  } %>
  </tbody>
  </table>
  <%
				out.println(ProductControl.pageInstance3.getToolsMenu(servicePages));
			%>
  <input type = "button" value = "添加服务" onclick="window.location.href='product_service_add.jsp'" />
  </form>
</body>
</html>